import unittest

from bs4 import BeautifulSoup
from lib.HTMLTestRunner import HTMLTestRunner
from script.approve import approve
from script.login import login
from script.tender import tender
from script.tender_process import test_tender_process
from script.trust import trust

suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(login))
suite.addTest(unittest.makeSuite(approve))
suite.addTest(unittest.makeSuite(trust))
suite.addTest(unittest.makeSuite(tender))
suite.addTest(unittest.makeSuite(test_tender_process))

# report_file = "report/report-{}.html".format(time.strftime("%Y%m%d-%H%M%S"))
report_file = "report/report.html"

with open(report_file, 'wb') as f:
    runner = HTMLTestRunner(f, title="P2P金融项目接口测试报告")
    runner.run(suite)
